/** 配色常量，便于维护 **/
@text-main: #303133;
@border-radius: 24rpx;
// 定义颜色变量，方便统一管理和修改
@color-primary-text: #303133;
@color-regular-text: #606266;
@color-secondary-text: #909399;
@color-placeholder-text: #c0c4cc;

@color-theme: #19be6b;
@color-theme-dark: #18b566;
@color-danger: #f56c6c;
@color-warning: #f9ae3d;

// 定义字体大小变量
@font-size-lg: 28rpx;
@font-size-md: 26rpx;
@font-size-sm: 24rpx;
@font-size-xs: 22rpx;

page {
  padding-bottom: 10px;
  --td-grid-item-text-middle-font-size: 24rpx;
  --td-grid-item-image-middle-width: 50rpx;
  --td-grid-item-text-color: #303133;
  --td-navbar-bg-color: transparent;
}

.background {
  z-index: -99;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;

  .circle1 {
    position: absolute;
    top: 0;
    left: 0;
    width: 175px;
    height: 175px;
    border-radius: 50%;
    background: #05C363;
    filter: blur(100px);
  }

  .circle2 {
    position: absolute;
    right: 0;
    top: 10px;
    width: 113px;
    height: 113px;
    border-radius: 50%;
    background-color: #7EC850;
    filter: blur(100px);
  }
}

.block {
  width: 90%;
  margin: 0 auto;
  border-radius: @border-radius;
}


.profile-section {
  color: #2e2e2e;
  display: flex;
  align-items: center;
  position: relative;

  .avatar {
    margin-right: 24rpx;
  }

  .profile-info {
    flex: 1;

    .nickname {
      font-size: 30rpx;
      font-weight: bold;
    }
  }

  .arrow-right {
    width: 40rpx;
    height: 40rpx;
    margin-left: 16rpx;
  }
}

.user-assets-container {
  display: flex;
  padding: 24rpx;
  margin: 20rpx auto;
  gap: 20rpx; // 使用 gap 属性创建间距，比 margin 更现代化
}

// 基础卡片样式
.asset-card {
  flex: 1;
  padding: 24rpx;
  border-radius: 20rpx;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease-in-out; // 为 hover 状态添加平滑过渡动画
}

// 卡片点击时的交互样式
.card-hover {
  transform: scale(0.98);
}

// 卡片头部通用样式
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20rpx;

  .title {
    font-size: @font-size-md;
    font-weight: bold;
  }

  .action {
    font-size: @font-size-xs;
  }
}

// 卡片主体通用样式
.card-body {
  flex-grow: 1; // 占据剩余空间
}

// 左侧 - 余额卡片特定样式
.balance-card {
  background: linear-gradient(135deg, @color-theme-dark, @color-theme);
  color: #ffffff;

  .action {
    color: rgba(255, 255, 255, 0.7);
  }

  .card-body {
    text-align: center;
    margin: 10rpx 0;
  }

  .balance-value {
    font-size: 48rpx; // 重点突出余额
    font-weight: bold;
    letter-spacing: 1rpx;
  }

  .rmb-value {
    font-size: @font-size-md;
    opacity: 0.8;
    margin-top: 4rpx;
  }

  .card-footer {
    text-align: center;
    margin-top: auto; // 将页脚推到底部

    .exchange-rate {
      font-size: @font-size-xs;
      opacity: 0.6;
      background-color: rgba(0, 0, 0, 0.1);
      padding: 4rpx 12rpx;
      border-radius: 20rpx;
    }
  }
}

// 右侧 - 闲置卡片特定样式
.idle-card {
  background-color: #ffffff;

  .title {
    color: @color-primary-text;
  }

  .action {
    color: @color-secondary-text;
  }

  .card-body {
    display: flex;
    flex-direction: column;
    gap: 20rpx; // 列表项之间的间距
  }

  .idle-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline; // 让文字基线对齐，更美观

    .label {
      font-size: @font-size-md;
      color: @color-regular-text;
    }

    .value {
      font-size: 36rpx; // 突出数量
      font-weight: bold;
      font-family: 'DIN-Alternate-Bold', sans-serif; // 使用数字字体，效果更佳（需引入）
    }

    // 状态颜色
    .status-on-shelf {
      color: @color-theme;
    }

    .status-off-shelf {
      color: @color-secondary-text;
    }

    .status-violation {
      color: @color-danger;
    }
  }
}



.tools-title {
  font-size: 30rpx;
  color: #c0c4cc;
  width: 90%;
  letter-spacing: 2px;
  margin: 30rpx auto;
}